<!-- 超级银行家用户管理页面 -->
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li><a>主页</a></li>
            <li><a>超级兑</a></li>
            <li class="active"><strong>积分机构管理</strong></li>
        </ol>
    </div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app ng-controller="orgManagementQueryCtrl">
    <form class="form-horizontal" id="form1">
        <div class="row">
            <div class="col-lg-12">
                <div class="">
                    <div class="panel-body ibox float-e-margins">
                        <div class="ibox-content">
                            <div class="ibox-title">
                                <h5>积分机构管理</h5>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">机构名称:</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="info.orgName">
                                </div>
                                <label class="col-sm-2 control-label">是否具备金融属性:</label>
                                <div class="col-sm-2">
                                    <select class="form-control" ng-model="info.finance" ng-options="x.value as x.text for x in financeSelect"/>
                                </div>
                            </div>
                            <div class="form-group" style="margin-top: 30px">
                                <div class="col-sm-8">
                                    <label class="col-sm-2 control-label"></label>
                                    <button class="btn btn-primary6 btn-mr20" type="button" ng-click="query()" >查询</button>
                                    <button class="btn btn-primary3 btn-mr20" type="button" ng-click="clear()" >清空</button>
                                    <button class="btn btn-primary5 btn-mr20" type="button" ng-show="hasPermit('orgManagement.addOrgManagement')" ng-click="addBankModal()" >新增机构</button>
                                    <button class="btn btn-primary7 btn-mr20" type="button" ng-show="hasPermit('orgManagement.importDetail')" ng-click="exportInfo()" >导出</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-body ibox float-e-margins">
                        <div class="ibox-title">
                            <div class="ibox-content">
                                <div class="gridStyle" ui-grid="userGrid" ui-grid-selection ui-grid-pagination
                                     ui-grid-resize-columns ui-grid-pinning></div>
                                <div ng-show="loadImg" class="timg"></div>
                            </div>
                        </div>
                        <div style="height:30px"></div>
                    </div>
                </div>
            </div>
        </div>
    </form>

    <div id="addBankModal" class="modal fade form-horizontal" tabindex="4" role="dialog">
        <div class="modal-dialog" style="height:450px;width: 900px">
            <div class="modal-content" >
                <form class="form-horizontal" name="horizontalCard" ng-submit="addBank()" novalidate>
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            &times;</button>
                        <h3 class="modal-title">新增机构</h3>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>机构名称:</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" name="orgName" maxlength="5" required ng-model="addinfo.orgName">
                                <div class="req_mesg" ng-show="horizontalCard.orgName.$dirty && horizontalCard.orgName.$invalid">
                                    <span ng-show="horizontalCard.orgName.$error.required">机构名称不能为空</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>顺序:</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" name="sort" required ng-model="addinfo.sort">
                                <div class="req_mesg" ng-show="horizontalCard.sort.$dirty && horizontalCard.sort.$invalid">
                                    <span ng-show="horizontalCard.sort.$error.required">顺序不能为空</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>logo:</label>
                            <div class="col-lg-7">
                                <input type="file" nv-file-select="" uploader="uploaderImg"   multiple  />
                                <label style="color:red; float:right;">注:建议LOGO尺寸为64*64</label>
                                <table class="table">
                                    <tbody>
                                    <tr ng-repeat="item in uploaderImg.queue">
                                        <td>
                                            <div ng-show="uploaderImg.isHTML5" ng-thumb="{ file: item._file, height: 100 }"></div>
                                        </td>
                                        <td nowrap>
                                            <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                                                <span class="glyphicon glyphicon-trash"></span> 删除
                                            </button>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>积分查询方式:</label>
                            <div class="col-sm-6">
                                <textarea class="form-control" rows="6" cols="10" name="remark" required ng-model="addinfo.remark"></textarea>
                                <div class="req_mesg" ng-show="horizontalCard.remark.$dirty && horizontalCard.remark.$invalid">
                                    <span ng-show="horizontalCard.remark.$error.required">积分查询方式不能为空</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>是否具备金融属性:</label>
                            <div class="col-sm-5">
                                <label><input type="radio" ng-model='addinfo.finance' name="finance"  ng-value="'1'"/>是</label>
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <label><input type="radio" ng-model='addinfo.finance' name="finance"  ng-value="'0'"/>否</label>
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <label style="color:red;">注:IOS审核过滤使用</label>
                            </div>

                        </div>
                        <div class="form-group" ng-repeat="item in listOrgDefault">
                            <div ng-if="item.isNeed=='1'">
                                <label class="col-sm-2 control-label">
                                    <i class="red_req">*</i>
                                    {{item.propertyDesc}}:
                                </label>
                                <div class="col-sm-6">
                                    <input class="form-control" name="{{item.propertyCode}}" required ng-model="item.propertyDefaultValue">
                                    <div class="req_mesg" ng-show="horizontalCard.{{item.propertyCode}}.$dirty && horizontalCard.{{item.propertyCode}}.$invalid">
                                        <span ng-show="horizontalCard.{{item.propertyCode}}.$error.required">{{item.propertyDesc}}不能为空</span>
                                    </div>
                                </div>
                            </div>
                            <div ng-if="item.isNeed!='1'">
                                <label class="col-sm-2 control-label">
                                    {{item.propertyDesc}}:
                                </label>
                                <div class="col-sm-6">
                                    <input class="form-control" ng-model="item.propertyDefaultValue">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <div class="form-group control-label">
                            <label class="col-sm-1 control-label"></label>
                            <div class="col-sm-6">
                                <button class="btn btn-primary btn-mr20" ng-disabled="horizontalCard.$invalid || submitting" type="button" ng-click='addBank()' >确定</button>
                                <button class="btn btn-primary4" type="button" ng-click='cancel()'
                                >返回</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>